@extends('layouts.base')
@section('title', '系统平台管理')
@section('content')
<!-- ============================================================== -->
<!-- Container fluid  -->
<!-- ============================================================== -->
<div class="container-fluid">
	<!-- ============================================================== -->
	<!-- Bread crumb and right sidebar toggle -->
	<!-- ============================================================== -->
	<div class="row page-titles">
	    <div class="col-md-5 align-self-center">
	        <h3 class="text-themecolor">系统平台--设置</h3>
	    </div>
	    <div class="col-md-7 align-self-center">
	        <ol class="breadcrumb">
	            <li class="breadcrumb-item"><a href="javascript:void(0)">首页</a></li>
	            <li class="breadcrumb-item">系统平台管理</li>
	        </ol>
	    </div>
	</div>
	<!-- ============================================================== -->
	<!-- End Bread crumb and right sidebar toggle -->
	<!-- ============================================================== -->

	<!-- ============================================================== -->
	<!-- Start Page Content -->
	<!-- ============================================================== -->
	<div class="row">
	    <div class="col-12">
	        <div class="card">
	            <div class="card-body">
                	<div class="card-body">
						@if ($errors->any())
							@foreach ($errors->all() as $error)
							<div class="alert alert-danger">
								{{ $error }}
							</div>
							@endforeach
						@endif

						@if(session()->has("data"))
							<div class="alert alert-{{session("data")['class']}}">
								{{ session('data')['msg'] }}
							</div>
						@endif
						<form action="{{ route('admin.config.store') }}" method="post">
							@csrf
							<input type="hidden" name="name" value="siteconfig">
							<input type="hidden" name="title" value="网络配置">
                            <div class="form-row">
                                <div class="col-md-8 mb-3">
                                  <label for="validationDefault04">网站名称：</label>
                                  <input type="text" name="sitetitle" value="{{isset($config['sitetitle'])?$config['sitetitle']:''}}" class="form-control" id="validationDefault04" placeholder="请填写网站名称"  >
                                </div>
                                <div class="col-md-8 mb-3">
                                  <label for="validationDefault05">网站域名：</label>
                                  <input type="text" name="domain" value="{{isset($config['domain'])?$config['domain']:''}}" class="form-control" id="validationDefault05" placeholder="请填写网站域名"  >
								</div>
								<div class="col-md-8 mb-3">
									<label for="validationDefault04">关键字：</label>
									<input type="text" name="keyword" value="{{isset($config['keyword'])?$config['keyword']:''}}" class="form-control" id="validationDefault04" placeholder="请填写关键字"  >
								</div>
								<div class="col-md-8 mb-3">
									<label for="validationDefault05">网站描述：</label>
									<textarea name="desc" class="form-control" id="validationDefault05" rows="3" placeholder="请填写网站描述">{{isset($config['desc'])?$config['desc']:''}}</textarea>	
								</div>
								<div class="col-md-8 mb-3">
									<label for="validationDefault05">网站状态：</label>
									<div class="row">
										<div class="demo-radio-button">
											@if(isset($config['status']))
											<input value="1" {{($config['status']==1)?'checked':''}} name="status" type="radio" id="radio_1" checked="" class="radio-col-teal">
											@else
											<input value="1" name="status" type="radio" id="radio_1" checked="" class="radio-col-teal">
											@endif
											<label for="radio_1">运行</label>
											@if(isset($config['status']))
											<input value="2" {{($config['status']==2)?'checked':''}} name="status" type="radio" id="radio_2" class="radio-col-pink">
											@else
											<input value="2" name="status" type="radio" id="radio_2" class="radio-col-pink">
											@endif
											<label for="radio_2">停止</label>
										</div>
                                    </div>
								</div>
								<div class="col-md-8 mb-3">
									<label for="closeinfo">关站提示：</label>
									<textarea name="closeinfo" class="form-control" id="validationDefault05" rows="3" placeholder="请输入关站提示信息">{{isset($config['closeinfo'])?$config['closeinfo']:''}}</textarea>	
								</div>
                            </div>
                            <button class="btn btn-primary" type="submit">提交</button>
                        </form>    
                    </div>        
	            </div>
	        </div>
	    </div>
	</div>
</div>         
                        
@stop
